package com.sy.controller;


import com.sy.entity.Userlogin;
import com.sy.service.intf.UserloginService;
import com.sy.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * @description: 码起 自动生成代码
 * @author: 小毛
 * @create: 2020-11-25 22:00:26
 */
@RestController
@RequestMapping("/api/userlogin")
public class UserloginController {
    @Autowired
    private UserloginService userloginService;
    //新增
    @PostMapping("/add.do")
    public R save(@RequestBody Userlogin userlogin){
        return userloginService.save(userlogin);
    }
    //删除
    @DeleteMapping("/del.do")
    public R del(int id){
        return userloginService.delById(id);
    }
    //查询
    @GetMapping("/all.do")
    public R all(){
        return userloginService.all();
    }
}